<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" href="./assets/lib/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="./sideshow20151016/css/normalize.css" />
    <link rel="stylesheet" type="text/css" href="./sideshow20151016/css/demo.css" />
   <!--必要样式-->
    <link rel="stylesheet" type="text/css" href="./sideshow20151016/css/component.css" />
    <link rel="stylesheet" href="./assets/css/login.css">
</head>

<body>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        body {
            overflow: hidden;
        }
    </style>
    
    <script>
        function search() {
            window.open("http://www.baidu.com/s?wd=" + $("#input").val());
        }
        document.onkeydown = function(event) {
            var e = event || window.event || arguments.callee.caller.arguments[0];
            if (e && e.keyCode == 13) {
                $.ajax({
                    type: 'POST',
                    url: 'api/login',
                    data: fd ,
                    success: function(res) {
                        // 登录成功后，跳转到主页面
                        if (res.status === 0) {
                            // 把登录成功的标志位存储在客户端
                            sessionStorage.setItem('mytoken', res.token)
                                // 跳转到主页面
                            location.href = './index.html'
                        } else {
                            // 登录失败
                            layer.msg(res.message)
                        }
                    }
                })

            }
        };
    </script>
    </head>

    <body>
        <div class="container demo-1">
			<div class="content">
				<div id="large-header" class="large-header">
                    <canvas id="demo-canvas"></canvas>
                      <!-- 表单 -->
        <div class="login-form">
            <!-- 标题 -->
            <div class="title">
                <h1>大事件后台管理系统</h1>
            </div>
            <!--登录表单 -->
            <form id="login-form" action="">

                <div class="layui-form-item">
                    <label class="layui-icon layui-icon-username" for="username"></label>
                    <input type="text" name="username" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <label class="layui-icon layui-icon-password" for="password"></label>
                    <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="formDemo">登录</button>
                </div>
            </form>



        </div>
					<!-- <h1 class="main-title"><span class="thin">Three</span></h1> -->
				</div>
				<!-- <nav class="codrops-demos">
					<a class="current-demo" href="index.html">Demo 1</a>
					<a href="index2.html">Demo 2</a>
					<a href="index3.html">Demo 3</a>
					<a href="index4.html">Demo 4</a>
				</nav> -->
			</div>
		</div><!-- /container -->
		
        <!-- <canvas id="canvas" width="1280" height="1024"> 您的浏览器不支持canvas标签，请您更换浏览器 </canvas>
        <script src="./jquerybaidu/js/word.js"></script>
        <p id="offscreen-text" class="offscreen-text"></p>
        <p id="text" class="text"></p> -->
        <!--<svg id="svg" > </svg>-->

        <!-- <div id="d" class="webdesigntuts-workshop"> <span> -->
        <!-- <input class="input" id="input" type="search" placeholder="请输入您要搜索的内容" autofocus="autofocus"/> -->
        <!-- <button onclick="search();">百度一下</button> -->
        <!-- </span> </div> -->



      
        <!-- 登录表单
    <form id="login-form" action="">

        <div class="layui-form-item">
            <label class="layui-icon layui-icon-username" for="username"></label>
            <input type="text" name="username" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
            <label class="layui-icon layui-icon-password" for="password"></label>
            <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit lay-filter="formDemo">登录</button>
        </div>
    </form> -->
    


        <script src="./assets/lib/jquery.js"></script>
        <script src='./jquerybaidu/js/index.js'></script>
        <script src="./assets/lib/layui/layui.all.js"></script>
        <script src="./sideshow20151016/js/TweenLite.min.js"></script>
        <script src="./sideshow20151016/js/EasePack.min.js"></script>
        <script src="./sideshow20151016/js/rAF.js"></script>
        <script src="./sideshow20151016/js/demo-1.js"></script>
        <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenMax.min.js"></script> -->
        <!-- <script src="./assets/lib/jquery.particleground.min.js"></script> -->
        <script src="./assets//js/common.js"></script>
        <script src="./assets/js/login.js"></script>
    </body>

</html>